package com.haixiaoke.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.haixiaoke.common.annotation.Excel;
import com.haixiaoke.common.core.domain.BaseEntity;
import lombok.Data;

import java.util.Date;

/**
 * 智能锁开锁记录对象 biz_lock_unlock_log
 *
 * @author qixi
 * @date 2023-05-29
 */
@Data
public class LockUnlockLog extends BaseEntity {
    /**
     * 11 - 反锁
     */
    public static final Integer UNLOCK_TYPE_BACK_LOCK = 11;
    /**
     * 12 - 门内开锁
     */
    public static final Integer UNLOCK_TYPE_INSIDE_UNLOCK = 12;
    /**
     * 关锁类型1:关闭反锁 2:打开反锁3:门内开门 4:弹出方舌
     */
    public static final Integer RECORD_TYPE_CLOSE_BACK_LOCK = 1;
    public static final Integer RECORD_TYPE_OPEN_BACK_LOCK = 2;
    public static final Integer RECORD_TYPE_INSIDE_UNLOCK = 3;
    public static final Integer RECORD_TYPE_BACK_LOCK = 4;
    /**
     * 锁状态: 0离线 1在线
     */
    public static final Integer LOCK_STATE_OFFLINE = 0;
    public static final Integer LOCK_STATE_ONLINE = 1;
    private static final long serialVersionUID = 1L;
    /**
     * id
     */
    private Long unlockId;

    /**
     * 智能锁sn
     */
    @Excel(name = "智能锁sn")
    private String lockSn;

    /**
     * 开锁类型:1：永久密码 2：指纹 3：临时密码 4：远程开锁 5：蓝牙开锁 6：cookie开锁 7：门卡开锁
     * 8- 撤防/布防 10：机械钥匙开门 11：反锁 12 - 门内开锁 13:装修密码 14:装修密码开锁失败 15:离线开锁 16:人脸开锁 17:胁迫报警
     */
    @Excel(name = "开锁方式", dictType = "unlock_type")
    private Integer unlockType;

    /**
     * 锁状态: 0离线 1在线
     */
    @Excel(name = "锁状态", readConverterExp = "0=离线,1=在线")
    private Integer lockState;


    /**
     * 开锁状态: 0：成功 1：失败:
     */
    @Excel(name = "开锁状态", dictType = "unlock_state")
    private Integer unlockState;

    /**
     * 开锁时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "开锁时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date unlockTime;

    /**
     * 开锁标识
     */
    @Excel(name = "开锁标识")
    private String identification;

    /**
     * 电池电量
     */
    @Excel(name = "电池电量")
    private String batteryInfo;

    /**
     * 关锁类型
     * 1:关闭反锁 2:打开反锁3:门内开门 4:弹出方舌
     */
    @Excel(name = "关锁类型", readConverterExp = "1=关闭反锁,2=打开反锁,3=门内开门,4=弹出方舌")
    private Integer recordType;

    /**
     * 品牌id
     */
    private Long brandId;

    /**
     * 品牌名称
     */
    @Excel(name = "品牌名称")
    private String brandName;

    /**
     * 型号id
     */
    private Long modelId;

    /**
     * 型号名称
     */
    @Excel(name = "型号名称")
    private String modelName;

    /**
     * 开门图片
     */
    private String openImage;


}
